var topModule ={
	initData:function (){
		$.ajax({
			url : "http://localhost:8888/simple_activiti/workflow/personal_task_total.do",
			dataType : "json",
			type : "post",
			success : function(result) {
				if (result.hasError) {
					window.wxc.xcConfirm(data[0].errorMsg,
							window.wxc.xcConfirm.typeEnum.error);
				} else {
					$("#totalTask").html(result.data[0]);
				}
			},
			error : function(data) {
				var text = "请求失败";
				window.wxc.xcConfirm(text,
						window.wxc.xcConfirm.typeEnum.error);
			}
		});
	},
	judgeLocation:function (){
		var location=window.location.href;
		var item=location.split("/")[4];
		$("."+item).addClass("active");
		
	}
};

$(function() {
	topModule.initData();
	topModule.judgeLocation();
});




